package src

import daos.DummyCreator
import model.Partida
import org.apache.wicket.markup.html.WebPage
import org.uqbar.wicket.xtend.WicketExtensionFactoryMethods
import org.uqbar.wicket.xtend.XLink
import java.io.Serializable

class Home extends WebPage implements Serializable {
	extension WicketExtensionFactoryMethods = new WicketExtensionFactoryMethods

	var Partida partida

	new() {
		partida = new Partida
		new DummyCreator(partida)
		this.addChild(new XLink("mapamundi") => [onClick =  [| responsePage = new MapaMundiPage(partida) ] ]  )
		this.addChild(new XLink("expediente") =>  [onClick = [| responsePage = new ExpedientesPage(partida) ] ] )
		
		}
	
	new(Partida _partida) {
		partida = _partida
		this.addChild(new XLink("mapamundi") => [onClick =  [| responsePage = new MapaMundiPage(partida) ] ]  )
		this.addChild(new XLink("expediente") =>  [onClick = [| responsePage = new ExpedientesPage(partida) ] ] )
		
		}
	



	
}
